package com.liduanwei.update.quartz_job;

import com.liduanwei.update.app.AppService;
import com.liduanwei.update.util.Constants;
import com.liduanwei.update.util.PrintUtil;
import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * Created by Wei on 17/10/3.
 */
public class CheckNewVersionJob implements Job {


    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        JobDetail detail = jobExecutionContext.getJobDetail();
        String name = detail.getJobDataMap().getString("name");
        PrintUtil.Companion.print("## job: checking...");

        String machineId = Constants.MACHINE_ID;
        /*AppService.checkNewestVersion(machineId, false);*/
        AppService.checkNewestVersion2(machineId, false);
    }


}
